package com.yunpeng.dishes.web.controllers;

import com.yunpeng.common.dto.Result;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Index 应用默认页面
 *
 * @author : Moore(hemw)
 * @date : 2020-03-13
 */
@RestController
@RequestMapping("/nutrients")
public class Index {


    @Value(value = "${env}")
    private String env;

    @RequestMapping(value = "")
    public String defaultOk() {
        return "OK";
    }

    @RequestMapping(value = "test2")
    public String test2() {
        return env;
    }

    @RequestMapping(value = "test3")
    public Result<Object> test3() {
        return Result.success();
    }

}
